<include file="public:header" />
<!--添加文章-->
<form id="info_form" action="{:U('article/add')}" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
			<li class="current">{:L('article_basic')}</li>			
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="120">{:L('article_cateid')} :</th>
						<td><select class="J_cate_select mr10" data-pid="0" data-uri="{:U('articleCate/ajax_getchilds')}" data-selected=""></select><input type="hidden" name="cateId" id="J_cate_id" value="" /></td>
					</tr>
		            <tr>
						<th>{:L('article_title')} :</th>
						<td>
							<input type="text" name="title" id="J_title" class="input-text" size="30">
					        <input type="hidden" value="" name="color" id="J_color">
					        <a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__STATIC__/images/color.png"></a>
		                </td>
					</tr>
                    
		            <tr>
						<th>{:L('sort_order')} :</th>
						<td>
							<input type="text" name="ordid" id="J_ordid" class="input-text" size="30">					     
		                </td>
					</tr> 
                    
                   <tr>                        
            	      <th>{:L('is_important')} :</th>
            	      <td>
                            <label><input type="radio" name="isImportant" value="0" checked="true"> {:L('no')}</label>&nbsp;&nbsp;
                            <label><input type="radio" name="isImportant" value="1" > {:L('yes')}</label>&nbsp;&nbsp;
            	      </td> 
                    </tr>
                    
                    
                    <tr>                        
            	      <th>{:L('store_channel')} :</th>
            	      <td>
                            <label><input type="radio" name="channel" value="0" checked> {:L('store_channel0')}</label>&nbsp;&nbsp;
                            <label><input type="radio" name="channel" value="1" > {:L('store_channel1')}</label>&nbsp;&nbsp;
                            <label><input type="radio" id="channel2" name="channel" value="2"> {:L('store_channel2')}</label>
            	      </td> 
                    </tr>
                                          
		            <tr>
						<th>{:L('article_copyfrom')} :</th>
						<td><input type="text" name="copyFrom" id="copyFrom" class="input-text" size="30" value=""></td>
					</tr>                                                         
					<tr>
						<th>{:L('publish')} :</th>
		 				<td>
		                	<label><input type="radio" name="status" class="radio_style" value="1"> {:L('yes')} </label>&nbsp;&nbsp;
							<label><input type="radio" name="status" class="radio_style" value="0" checked="checked"> {:L('no')}</label>
						</td>
					</tr>
		            <tr>
						<th>详细内容 :</th>
		                <td><textarea name="info" id="info" style="width:68%;height:400px;visibility:hidden;resize:none;"></textarea></td>
					</tr>
				</table>
			</div>
			
        </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
</form>
<include file="public:footer" />
<script src="__STATIC__/js/jquery/plugins/colorpicker.js"></script>
<script src="__STATIC__/js/kindeditor/kindeditor.js"></script>
<script>
$('.J_cate_select').cate_select('请选择');
$(function() {
	KindEditor.create('#info', {
		uploadJson : '{:U("attachment/editer_upload")}',
		fileManagerJson : '{:U("attachment/editer_manager")}',
		allowFileManager : true
	});
	$('ul.J_tabs').tabs('div.J_panes > div');

	//颜色选择器
	$('.J_color_picker').colorpicker();

	//自动获取标签
	$('#J_gettags').live('click', function() {
		var title = $.trim($('#J_title').val());
		if(title == ''){
			$.pinphp.tip({content:lang.article_title_isempty, icon:'alert'});
			return false;
		}
		$.getJSON('{:U("article/ajax_gettags")}', {title:title}, function(result){
			if(result.status == 1){
				$('#J_tags').val(result.data);
			}else{
				$.pinphp.tip({content:result.msg});
			}
		});
	});
	
});
</script>
</body>
</html>